package com.ysm.smfu.holder;

import android.view.View;
import android.widget.TextView;

import com.ysm.smfu.R;
import com.ysm.smfu.bean.VersionInfo;
import com.ysm.smfu.utils.UIUtils;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * Created by Administrator on 2016/12/6.
 */
public class HistoryVersionHolder extends BaseHolder<VersionInfo.HistoryVersionInfo> {

    @BindView(R.id.versionCode)
    TextView versionCode;
    @BindView(R.id.versionTime)
    TextView versionTime;
    @BindView(R.id.versionScripe)
    TextView versionScripe;

    @Override
    protected View initView() {
        View view = UIUtils.inflate(R.layout.holder_history_version);
        ButterKnife.bind(this,view);
        return view;
    }

    @Override
    protected void refreshView(VersionInfo.HistoryVersionInfo data) {
        if (data == null)
            return;
        versionCode.setText(data.appVersionName+"版本");
        versionTime.setText(data.appDate);
        versionScripe.setText(data.appDescribe);
    }
}
